<template>
    <div class="textInput flex1">
        <div class="text">{{ text }}</div>
        <el-select v-model="value" class="m-2" :placeholder="placeholder" @change="oninput">
    <el-option
      v-for="item in options"
      :key="item"
      :label="item"
      :value="item"
    />
  </el-select>
    </div>
</template>

<script setup lang="ts">
import { ref ,defineEmits} from 'vue'
let emit=defineEmits(['getInputVal'])
let value=ref('')
// 数据传给父级
let oninput=()=>{
  emit('getInputVal',value.value)
 
  
}



defineProps({
    options:{
        type:Object||Array,
    },
text:{
    type:String,
    default:'签约状态:',
},
placeholder:{
    type:String,
    default:'请选择签约状态',
},

})

</script>

<style scoped>
.textInput{
    width: 20%;
}
.text{
    white-space:nowrap;
    line-height: 32px;
}
.m-2{
  border:none;
  outline: none;
}
</style>